package com.wkang.controller;

import com.wkang.feign.UserClient;
import com.wkang.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: wkang
 * @package: com.wkang.controller
 * @date: 2019/11/14
 * @version: ver1.0
 */
@RestController
@RequestMapping(value="/feign")
public class ConsumerFeignController {
    @Autowired
    UserClient userClient;

    @RequestMapping(value="{/id}")
    public User queryById(@PathVariable(value = "id")Integer id){
        return userClient.findById(id);

    }

}
